import Vue from 'vue'
import VueRouter from 'vue-router'

const Msite = () => import('../pages/Msite/Msite.vue')
const Classify = () => import('../pages/Classify/Classify.vue')
const Profile = () => import('../pages/Profile/Profile.vue')
const ShoppingCart = () => import('../pages/ShoppingCart/ShoppingCart.vue')
const Search = () => import('../pages/Search/Search.vue')
const Purchase = () => import('../pages/Purchase/Purchase.vue')
const Myaddress = () => import('../pages/Profile/Myaddress/Myaddress.vue')
const Addaddress = () => import('../pages/Profile/Addaddress/Addaddress.vue')
const SearchResult = () => import('../pages/Search/SearchResult/SearchResult.vue')

Vue.use(VueRouter)
export default new VueRouter({
    mode: 'history',
    routes: [
        {
            path: "/",
            redirect: '/msite'
        },
        {
            path: "/msite",
            component: Msite
        },
        {
            path: "/classify",
            component: Classify
        },
        {
            path: "/profile",
            component: Profile
        },
        {
            path: "/shoppingcart",
            component: ShoppingCart
        },
        {
            path: "/search",
            component: Search
        }, {
            path: "/purchase",
            component: Purchase
        }, {
            path: "/myaddress",
            component: Myaddress
        }, {
            path: "/addaddress",
            component: Addaddress
        }, {
            path: "/searchresult/:id",
            component: SearchResult
        }
    ]
})